import request from '@/utils/request'

//角色列表
export function roleList(formData,pageData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/platform/role/page/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'post',
    headers:{'Content-Type':'application/json'},
    data:newData
  })
}
//角色修改
export function update(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/platform/role/update',
    method: 'post',
    headers:{'Content-Type':'application/json'},
    data:newData
  })
}
//角色添加
export function addto(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/platform/role/add',
    method: 'post',
    headers:{'Content-Type':'application/json'},
    data:newData
  })
}
//角色删除
export function del(roleId) {
  return request({
    url: '/platform/role/delete/'+roleId,
    method: 'post',
    headers:{'Content-Type':'application/json'},
  })
}
//查询权限（编辑角色查询）
export function getEditSysPermList(roleId) {
  return request({
    url: '/platform/role/getEditSysPermList/'+roleId,
    method: 'post',
    headers:{'Content-Type':'application/json'},
  })
}
//查询权限（新增角色查询）
export function getSysPermList() {
  return request({
    url: '/platform/role/getSysPermList',
    method: 'post',
    headers:{'Content-Type':'application/json'},
  })
}